<template>
<div class="introduce-container">
  <div class="introduce-concise" v-if="introduce.show_way_type === 'concise'">
    <div class="concise-list" v-for="(item, index) in introduce.concise_content">
      <div class="concise-list-item" :key="`concise-list-item-${index}`">
        <div v-if="item.type === 'text'">
          <div class="ql-container ql-snow">
            <div class="ql-editor" v-html="item.content"></div>
          </div>
        </div>
        <div v-else-if="item.type === 'image'">
          <el-image style="width: 100%;" :src="item.content" fit="fill" :lazy="false">
            <div slot="error" class="image-slot">
              <i class="el-icon-picture-outline"></i>
            </div>
          </el-image>
        </div>
      </div>
    </div>
  </div>
  <div class="introduce-rich" v-if="introduce.show_way_type === 'rich'">
    <div class="ql-container ql-snow">
      <div class="ql-editor" v-html="introduce.rich_content"></div>
    </div>
  </div>
</div>
</template>

<script>
import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
export default {
  name: "IntroduceView",
  props: {
    introduce: {
      type: Object,
      default: () => {}
    }
  },
}
</script>
<style lang="scss" scoped>
.introduce-container {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.ql-container.ql-snow {
  border: unset;
}
</style>
